package com.lyp.lease.common.context;

public class LoginUserContext {

    private static final ThreadLocal<LoginUser> loginUserThreadLocal = new ThreadLocal<>();

    public static void setLoginUser(LoginUser loginUser) {
        loginUserThreadLocal.set(loginUser);
    }

    public static LoginUser getLoginUser(){
        return loginUserThreadLocal.get();
    }
    public static void removeContext(){
        loginUserThreadLocal.remove();
    }
}
